package de.hpi.generator.config;

public class DependencyModel {

    /**
     * @uml.property  name="dependent"
     */
    public String dependent;
    /**
     * @uml.property  name="referenced"
     */
    public String referenced;
    transient boolean isComposite;
    public DistributionModel distribution = null;

    public DependencyModel(String aDependent, String aReferenced) {
        this.dependent = aDependent;
        this.referenced = aReferenced;
    }

    public DependencyModel(String aDependent, String aReferenced, DistributionModel aDistribution) {
        this.dependent = aDependent;
        this.referenced = aReferenced;
        this.distribution = aDistribution;
    }

    @Override
    public String toString() {
        String result = String.format("{%s -> %s} \n", this.dependent, this.referenced);
        return result;
    }

    public void setComposite(boolean isComposite) {
        this.isComposite = isComposite;
    }

    public boolean isComposite() {
        return isComposite;
    }

    public DistributionModel getDistribution() {
        return distribution;
    }
}
